/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: zhnb
 * Date: 2011-4-11 下午03:49:14
 */

package com.ccx.dbpool;

import java.io.Serializable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 数据源配置信息
 * @author zhnb
 *
 */
public class ConfigInfo implements Serializable{
	
	private static final long serialVersionUID = -8850558877712912108L;
	private static Logger logger = LoggerFactory.getLogger(ConfigInfo.class);
	
	//数据源名称
	private String dataSourceName;
	//jdbc驱动
	private String jdbcClass;
	//每区最小连接数
	private int minConnectionsPerPartition;
	//每区最小连接数
	private int maxConnectionsPerPartition;
	//区数
	private int partitionCount;
	//数据库地址
	private String jdbcUrl;
	//用户名
	private String username;
	//密码
	private String password;
	
	public ConfigInfo() {
		super();
	}
	
	public String getDataSourceName() {
		return dataSourceName;
	}
	public void setDataSourceName(String dataSourceName) {
		this.dataSourceName = dataSourceName;
	}
	public int getMinConnectionsPerPartition() {
		return minConnectionsPerPartition;
	}
	public void setMinConnectionsPerPartition(int minConnectionsPerPartition) {
		this.minConnectionsPerPartition = minConnectionsPerPartition;
	}
	public int getMaxConnectionsPerPartition() {
		return maxConnectionsPerPartition;
	}
	public void setMaxConnectionsPerPartition(int maxConnectionsPerPartition) {
		this.maxConnectionsPerPartition = maxConnectionsPerPartition;
	}
	public int getPartitionCount() {
		return partitionCount;
	}
	public void setPartitionCount(int partitionCount) {
		this.partitionCount = partitionCount;
	}
	public String getJdbcUrl() {
		return jdbcUrl;
	}
	public void setJdbcUrl(String jdbcUrl) {
		this.jdbcUrl = jdbcUrl;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getJdbcClass() {
		return jdbcClass;
	}

	public void setJdbcClass(String jdbcClass) {
		this.jdbcClass = jdbcClass;
	}

	@Override
	public String toString() {
		return "ConfigInfo [dataSourceName=" + dataSourceName + ", jdbcClass="
				+ jdbcClass + ", jdbcUrl=" + jdbcUrl
				+ ", maxConnectionsPerPartition=" + maxConnectionsPerPartition
				+ ", minConnectionsPerPartition=" + minConnectionsPerPartition
				+ ", partitionCount=" + partitionCount + ", password="
				+ password + ", username=" + username + "]";
	}

}
